import request from '@/utils/request'

// 获取文章列表
export const getArticleList = params => request.get('/admin/article',{params})

// 删除文章
// export const deleteArticle = id => request.delete(`/admin/article/${id}`)
export const deleteArticle = data => request.delete(`/admin/article/`,{data})

// 添加文章
export const addArticle = data => request.post(`/admin/article/`,data)

// 修改文章
export const editArticle = (id,data) => request.put(`/admin/article/${id}`,data)

// 根据id获取文章
export const getArticleId = id => request.get(`/admin/article/${id}`)
